"""

Template for Characters

Copy this module up one level and name it as you like, then
use it as a template to create your own Character class.

To make new logins default to creating characters
of your new type, change settings.BASE_CHARACTER_TYPECLASS to point to
your new class, e.g.

settings.BASE_CHARACTER_TYPECLASS = "game.gamesrc.objects.mychar.MyChar"

Note that objects already created in the database will not notice
this change, you have to convert them manually e.g. with the
@typeclass command.

"""
from ev import Character

class AriseCharacter(Character):
    """
    The Character is like any normal Object (see example/object.py for
    a list of properties and methods), except it actually implements
    some of its hook methods to do some work:

    at_basetype_setup - always assigns the default_cmdset to this object type
                    (important!)sets locks so character cannot be picked up
                    and its commands only be called by itself, not anyone else.
                    (to change things, use at_object_creation() instead)
    at_after_move - launches the "look" command
    at_disconnect - stores the current location, so the "unconnected" character
                    object does not need to stay on grid but can be given a
                    None-location while offline.
    at_post_login - retrieves the character's old location and puts it back
                    on the grid with a "charname has connected" message echoed
                    to the room

    """
    
    def func(self):
        pass
        
    def at_object_creation(self):
        """
        This is run at character creation.  It creates and/or sets the large
        set of attributes that will always exist on a character.
        """
        
        # Character features, from head to toe
        self.db.hair_length = "long"
        self.db.hair_color = "brown"
        self.db.hair_style = "tied back"        
        
        self.db.desc = self.gen_desc()
    
    def gen_desc(self):
        """
        """
        
        desc = "You have %s, %s hair that is %s." % (self.db.hair_length, self.db.hair_color, self.db.hair_style)
        return desc
        
        
        
        
        
        
        
        